#ifndef SETPARAMSDLG_H
#define SETPARAMSDLG_H

#include <QDialog>

#define SetParamsDlgIns SetParamsDlg::Instance()

namespace Ui {
class SetParamsDlg;
}

class SetParamsDlg : public QDialog
{
    Q_OBJECT

public:
    explicit SetParamsDlg(QWidget *parent = nullptr);
    ~SetParamsDlg();

    static SetParamsDlg *Instance();

private slots:
    void on_pushButton_ok_clicked();

    void on_pushButton_cancle_clicked();

public:
    int GetCANType();
    int GetDeviceIndex();
    int GetBaundRate();
    int GetCANCom();

private:
    void initComboBox();

private:
    Ui::SetParamsDlg *ui;

    int m_CAN_type;         //CAN卡类型
    int m_device_index;     //设备索引
    int m_baundRate;        //波特率
    int m_CANCom;           //通道
};

#endif // SETPARAMSDLG_H
